package com.oracleoaec.entity;

import java.io.Serializable;

public class Car implements Serializable{
	private static final long serialVersionUID = 1L;
	private long id;
	private String color;
	private String model;//这个就是名字
	private String carNumber;
	private double price;  
	private double rent;
	private String comments;
	private int status;// 默认可租(0) 不可租(1)
	private int userable;// 默认上架(0) 未上架(1)
	private long brand_id;
	private long category_id;
	
	private String brandName;
	private String typeName;
	
	public String getBrandName() {
		return brandName;
	}
	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public Car() {
	}
	public Car(String color, String model, String carNumber,
			double price, double rent, String comments, int status,
			int userable, long brand_id, long category_id) {
		this.color = color;
		this.model = model;
		this.carNumber = carNumber;
		this.price = price;
		this.rent = rent;
		this.comments = comments;
		this.status = status;
		this.userable = userable;
		System.out.println("status="+status);
		System.out.println("userable="+userable);
		this.brand_id = brand_id;
		this.category_id = category_id;
	}

	public Car(long id, String color, String model, String carNumber,
			double price, double rent, String comments, int status,
			int userable, long brand_id, long category_id) {
		this.id = id;
		this.color = color;
		this.model = model;
		this.carNumber = carNumber;
		this.price = price;
		this.rent = rent;
		this.comments = comments;
		this.status = status;
		this.userable = userable;
		this.brand_id = brand_id;
		this.category_id = category_id;
	}

	
	
	public Car(long id, String color, String model, String carNumber,
			double price, double rent, String comments, int status,
			int userable, long brand_id, long category_id, String brandName,
			String typeName) {
		this.id = id;
		this.color = color;
		this.model = model;
		this.carNumber = carNumber;
		this.price = price;
		this.rent = rent;
		this.comments = comments;
		this.status = status;
		this.userable = userable;
		this.brand_id = brand_id;
		this.category_id = category_id;
		this.brandName = brandName;
		this.typeName = typeName;
	}
	@Override
	public String toString() {
		return getId()+"\t"+getModel()+"\t"+getComments()
				+"\t"+getBrandName()+"("+getBrand_id()+")\t"+getTypeName()+"("+getCategory_id()+")"
				+"\t"+getRent()+"/天"+"\t"+(getStatus()==0?"是":"否");
	}
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getCarNumber() {
		return carNumber;
	}
	public void setCarNumber(String carNumber) {
		this.carNumber = carNumber;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getRent() {
		return rent;
	}
	public void setRent(double rent) {
		this.rent = rent;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getUserable() {
		return userable;
	}
	public void setUserable(int userable) {
		this.userable = userable;
	}
	public long getBrand_id() {
		return brand_id;
	}
	public void setBrand_id(long brand_id) {
		this.brand_id = brand_id;
	}
	public long getCategory_id() {
		return category_id;
	}
	public void setCategory_id(long category_id) {
		this.category_id = category_id;
	}
}
